n,m,L=map(int,input().split())

a=[0 for i in range(0,L)]

for i in range(0,n):
    nums=list(map(int,input().split()))
    for j in range(0,m):
        a[nums[j]]+=1

for item in a:
    print(item,end=" ")
print("")